<template>
	<view class="build-info-container">
		<view class="header">
			<view class="left">
				楼栋基本信息
			</view>
			<!-- <view class="right" @tap="goEdit">
				<image src="../../static/bianji.png" mode="scaleToFill" style="width: 28rpx;height: 28rpx;"></image>
				<view style="margin-left:6rpx">
					编辑
				</view>
			</view> -->
		</view>
		<view class="info-detail-info-item">
			单元数量：{{params1['单元数'] + '个'}}
		</view>
		<view class="info-detail-info-item">
			楼层数量：{{params1['楼层数'] + '个'}}
		</view>
		<!-- 	<view class="info-detail-info-item">
			设施编号：{{info["设施编号"]}}
		</view> -->

		<view class="info-detail-info-item">
			房屋数量：{{params1['房屋数'] + '个'}}
		</view>
		<!-- 	<view class="info-detail-info-item">
			所属网格：{{info["所属网格"]}}
		</view> -->
		<!-- 		<view class="info-detail-info-item">
			网格员：{{info["网格员"]}}
		</view>
		<view class="info-detail-info-item">
			网格长：{{info["网格长"]}}
		</view>
		<view class="info-detail-info-item">
			所属检查点：{{info["检查点"]}}
		</view>
		<view class="info-detail-info-item">
			所属检查类型：{{info['检查类型']}}
		</view> -->
		<view class="info-detail-info-item">
			住户数量：{{params1['住户数'] + '个'}}
		</view>
		<view class="info-detail-info-item">
			设施数量：{{params1['设备数'] + '个'}}
		</view>
		<view class="info-detail-info-item">
			消防栓：{{params1['消防栓'] + '个'}}
		</view>
		<view class="info-detail-info-item">
			灭火器：{{params1['灭火器'] + '个'}}
		</view>
		<view class="info-detail-info-item">
			烟雾探测器：{{params1['烟雾探测器'] + '个'}}
		</view>
		<view class="info-detail-info-item">
			温度探测器：{{params1['温度探测器'] + '个'}}
		</view>
		<view class="info-detail-info-item">
			煤气罐：{{params1['煤气罐'] + '个'}}
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				params: {
					楼栋id: null
				},
				params1: {
					
				},
				checkId: null
			}
		},
		onLoad(options) {
			this.params.楼栋id = +options.id
			this.checkId = +options.checkId
			this.getInstallDetail()
		},
		onShow() {
			this.getBuildInfo()
		},
		methods: {
			getBuildInfo() {
				this.$http.post('gridSystem/building/countinfo', this.params).then(res => {
					console.log(res)
					if(res.code === 10000) {
						this.params1 = res.data
					}
				})
			},
			getInstallDetail(id) {
				this.$http.post('gridSystem/device/info', {
					id
				}).then(res => {
					if (res.code === 10000) {
						this.info = res.data
					}
				})
			},
			goEdit() {
				uni.navigateTo({
					url: '/fireGridCheck/buildDetail/buildDetail?item=' + JSON.stringify(this.params1.楼栋) + '&id=' + this.checkId
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	.build-info-container {
		padding: 20rpx;
	}
	.right {
		display: flex;
		align-items: center;
		color: #5094FF;
		justify-content: flex-end;
		padding: 10rpx 20rpx;
	}
	.header {
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
	
		&::before {
			content: "";
			display: inline-block;
			width: 6px;
			height: 30px;
			background: #1064E9;
			position: absolute;
		}
	
		.left {
			padding: 20rpx 32rpx;
			font-size: 32rpx;
			color: #333333;
		}
	
		.right {
			display: flex;
			align-items: center;
			color: #5094FF;
		}
	}
</style>
